<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<body>
	<ui:composition template="/template/template.xhtml">
		<ui:define name="title">#{aqarMsgs.Aqarat_Customer_CustomerSearch_PageTitle}</ui:define>
		<ui:define name="manuBar">
			<ui:include src="/controlling/aqarat/aqaratMenu.xhtml" />
		</ui:define>
		<ui:define name="content">
			<p:panel
				header="#{aqarMsgs.Aqarat_Customer_CustomerSearch_CustomerSearch}">
				<h:form>
					<p:panel
						header="#{aqarMsgs.Aqarat_Customer_CustomerSearch_CustomerSearch}">
						<p:messages id="msgs" />
						<p:panel>
							<h:panelGrid columns="2">
								<h:outputText value="#{aqarMsgs.Aqarat_Customer_Name}" />
								<p:inputText value="#{customerSearchBean.customer.name}" />
								<h:outputText value="#{aqarMsgs.Aqarat_Customer_CardNo}" />
								<p:inputText value="#{customerSearchBean.customer.cardNo}" />
								<h:outputText value="#{aqarMsgs.Aqarat_Customer_Mobile}" />
								<p:inputText value="#{customerSearchBean.customer.mobile}" />
							</h:panelGrid>
							<p:commandButton value="#{aqarMsgs.Aqarat_General_Search}"
								actionListener="#{customerSearchBean.searchCustomer}"
								onstart="waiteDialog.show();" oncomplete="waiteDialog.hide();"
								update="customer_list msgs" />
						</p:panel>
						<p:panel id="customer_list">
							<p:dataTable id="customer_tb_list" var="customer"
								value="#{customerSearchBean.customerList}" paginator="true"
								rows="10"
								paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
								rowsPerPageTemplate="5,10,15" lazy="true">

								<p:column>
									<f:facet name="header">
										<h:outputText value="#{aqarMsgs.Aqarat_Customer_Name}" />
									</f:facet>
									<h:outputText value="#{customer.name}" />
								</p:column>
								<p:column>
									<f:facet name="header">
										<h:outputText value="#{aqarMsgs.Aqarat_Customer_CardNo}" />
									</f:facet>
									<h:outputText value="#{customer.cardNo}" />
								</p:column>
								<p:column>
									<f:facet name="header">
										<h:outputText value="#{aqarMsgs.Aqarat_Customer_Mobile}" />
									</f:facet>
									<h:outputText value="#{customer.mobile}" />
								</p:column>
								<f:facet name="footer">
									<h:commandLink>
										<p:graphicImage value="/resources/images/excel.png"
											style="border:0px;" alt="all Customers" />
										<p:dataExporter type="xls" target="customer_tb_list"
											fileName="Customers" />
									</h:commandLink>
								</f:facet>
							</p:dataTable>
						</p:panel>
					</p:panel>

				</h:form>
			</p:panel>
		</ui:define>
	</ui:composition>
</body>
</html>
